//
//  LogonView.m
//  UI_豆瓣2.0
//
//  Created by dllo on 15/11/7.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "LogonView.h"

@interface LogonView ()

@property (nonatomic, retain) UILabel *userNameLabel;
@property (nonatomic, retain) UILabel *passwordLabel;
@property (nonatomic, retain) UILabel *passwordTwoLabel;
@property (nonatomic, retain) UILabel *emailLaber;
@property (nonatomic, retain) UILabel *phoneNumberLabel;

@end

@implementation LogonView

- (void)dealloc
{
    [_userNameLabel release];
    [_passwordLabel release];
    [_passwordTwoLabel release];
    [_emailLaber release];
    [_phoneNumberLabel release];
    [_userNameTextField release];
    [_passwordTextField release];
    [_passwordTwoTextField release];
    [_emailTextField release];
    [_phoneNumberTextField release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}


- (void)createSubViews{
    
    self.userNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(30, 100, 100, 30)];
    self.userNameLabel.backgroundColor = [UIColor clearColor];
    self.userNameLabel.text = @"用户名:";
    self.userNameLabel.font = [UIFont systemFontOfSize:20];
    [self addSubview:self.userNameLabel];
    [_userNameLabel release];
    
    self.userNameTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 100, 200, 30)];
    self.userNameTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.userNameTextField.clearButtonMode = 4;
    self.userNameTextField.placeholder = @"请输入用户名";
    [self addSubview:self.userNameTextField];
    [_userNameTextField release];
    
    self.passwordLabel = [[UILabel alloc] initWithFrame:CGRectMake(30, 160, 100, 30)];
    self.passwordLabel.backgroundColor = [UIColor clearColor];
    self.passwordLabel.font = [UIFont systemFontOfSize:20];
    self.passwordLabel.text = @"密码:";
    [self addSubview:self.passwordLabel];
    [_passwordLabel release];
    
    self.passwordTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 160, 200, 30)];
    self.passwordTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.passwordTextField.clearButtonMode = 4;
    self.passwordTextField.secureTextEntry = YES;
    self.passwordTextField.placeholder = @"请输入密码";
    [self addSubview:self.passwordTextField];
    [_passwordTextField release];
    
    self.passwordTwoLabel = [[UILabel alloc] initWithFrame:CGRectMake(30, 220, 100, 30)];
    self.passwordTwoLabel.backgroundColor = [UIColor clearColor];
    self.passwordTwoLabel.font = [UIFont systemFontOfSize:20];
    self.passwordTwoLabel.text = @"确认密码:";
    [self addSubview:self.passwordTwoLabel];
    [_passwordTwoLabel release];
    
    self.passwordTwoTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 220, 200, 30)];
    self.passwordTwoTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.passwordTwoTextField.clearButtonMode = 4;
    self.passwordTwoTextField.secureTextEntry = YES;
    self.passwordTwoTextField.placeholder = @"再次输入密码";
    [self addSubview:self.passwordTwoTextField];
    [_passwordTwoTextField release];
    
    
    self.emailLaber = [[UILabel alloc] initWithFrame:CGRectMake(30, 280, 100, 30)];
    self.emailLaber.backgroundColor = [UIColor clearColor];
    self.emailLaber.font = [UIFont systemFontOfSize:20];
    self.emailLaber.text = @"邮箱:";
    [self addSubview:self.emailLaber];
    [_emailLaber release];
    
    self.emailTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 280, 200, 30)];
    self.emailTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.emailTextField.clearButtonMode = 4;
    self.emailTextField.secureTextEntry = NO;
    self.emailTextField.placeholder = @"请输入邮箱";
    [self addSubview:self.emailTextField];
    [_emailTextField release];
    
    self.phoneNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(30, 340, 100, 30)];
    self.phoneNumberLabel.backgroundColor = [UIColor clearColor];
    self.phoneNumberLabel.font = [UIFont systemFontOfSize:20];
    self.phoneNumberLabel.text = @"联系方式:";
    [self addSubview:self.phoneNumberLabel];
    [_phoneNumberLabel release];
    
    self.phoneNumberTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 340, 200, 30)];
    self.phoneNumberTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.phoneNumberTextField.clearButtonMode = 4;
    self.phoneNumberTextField.secureTextEntry = NO;
    self.phoneNumberTextField.placeholder = @"请输入联系方式";
    self.phoneNumberTextField.keyboardType = UIKeyboardTypePhonePad;
    [self addSubview:self.phoneNumberTextField];
    [_phoneNumberTextField release];
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
